#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main()
{
int ret=fork();
if(ret>0)
{
  while(1)
{
printf("I am parent process,my pid is %d,my father ppid is %d\n",getpid(),getppid());
//fflush(stdout);
sleep(2);
}
}
if(ret==0)
{
while(1)
{
printf("I am child process,my pid is %d,my father ppid is %d\n",getpid(),getppid());
//fflush(stdout);
sleep(2);
}
}
  return 0;
}

